package com.micosco.taskremind.ui;

import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;

import com.micosco.taskremind.R;
import com.micosco.taskremind.data.Task;

public class TaskViewHolder extends RecyclerView.ViewHolder {
    public final View mView;
    public final TextView mSubjectView;
    public final TextView mTitleView;
    public final TextView mRemainingTimeView;
    public final ConstraintLayout layout;
    public Task mItem;

    public TaskViewHolder(View view) {
        super(view);
        mView = view;
        mSubjectView = view.findViewById(R.id.entry_subject);
        mTitleView = view.findViewById(R.id.entry_title);
        mRemainingTimeView = view.findViewById(R.id.entry_remaining_time);
        layout = view.findViewById(R.id.task_entry);
    }

    @NonNull
    @Override
    public String toString() {
        return super.toString() + " '" + mTitleView.getText() + "'";
    }
}
